﻿using liaowa2.Entity.DTO;
using liaowa2.Entity.InputDTO;
using liaowa2.Entity.Web;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace liaowa2.Interface.Manager
{
    public interface IManagerUserInterface
    {

        /// <summary>
        /// 管理员登陆
        /// </summary>
        /// <param name="UserName"></param>
        /// <param name="Password"></param>
        /// <returns></returns>
        ResultMsg ManagerLogin(string UserName, string Password);

        /// <summary>
        /// 管理员修改密码
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="oldPwd"></param>
        /// <param name="newPwd"></param>
        /// <returns></returns>
        int ManagerChangePwd(string userName, string oldPwd, string newPwd);

        /// <summary>
        /// 检查用户名是否存在
        /// </summary>
        /// <param name="phone"></param>
        /// <returns></returns>
        bool CheckUserName(string userName);

        /// <summary>
        /// 重置密码
        /// </summary>
        /// <param name="newPwd"></param>
        /// <param name="userCode"></param>
        /// <returns></returns>
        bool ChangPwd(string newPwd, string userCode);

        /// <summary>
        /// 根据条件获得数据列表
        /// </summary>
        List<ManagerUser> GetList(string strWhere);

        /// <summary>
        /// 获取用户列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        EntityPage<ManagerUser> GetManagerUserPage(ManagerUserView input);

        /// <summary>
        /// 启用禁用用户
        /// </summary>
        /// <param name="id"></param>
        /// <param name="enable"></param>
        /// <returns></returns>
        bool IsEnable(int id, int enable);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ManagerUser> GetModel(int id=0);


        bool AddUser(ManagerUser input);


        bool EditUser(ManagerUser input);

    }
}
